home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 131 / XENIATGM131.iso / Goodies / I-WAR 2 Egde of Chaos - New SDK / IW2-EOC_Pog_Scripting_SDK.exe / include / State.h < prev    next >
C/C++ Source or Header  |  2002-01-14  |  3KB  |  122 lines

  1. //
  2. // (c) 1999 Particle Systems Ltd. All Rights Reserved
  3. //
  4. // State.h
  5. //
  6. // API for the package State.
  7. //
  8. // Revision control information:
  9. //
  10. // $Header: /iwar2/resource/scripts/include/State.h 10    25/10/01 15:43 Steve $
  11. //
  12.  
  13. #include "Flux.h"
  14.  
  15. #ifdef FLUX_COMPILE
  16.  
  17. FLUX_DECLARE_EXTENSION(State);
  18.  
  19. #ifdef FLUX_LIB
  20. #if _MSC_VER >= 1000
  21. #pragma comment( lib, "State" )
  22. #endif // _MSC_VER >= 1000
  23. #endif // FLUX_LIB
  24.  
  25. #else
  26.  
  27. // Dependencies ///////////////////////////////////////////////////////////////
  28.  
  29. // Type definitions ///////////////////////////////////////////////////////////
  30.  
  31. handle hstate : hobject;
  32.  
  33. // Exported functions /////////////////////////////////////////////////////////
  34.  
  35. //
  36. // hstate State.Cast( hobject o )
  37. //
  38. // Cast an object handle to a state handle
  39. //
  40. prototype hstate State.Cast( hobject o );
  41.  
  42. //
  43. // htask State.Task( hstate state )
  44. //
  45. // Return the task associated with a given state, if it exists.
  46. //
  47. prototype htask State.Task( hstate state );
  48.  
  49. //
  50. // hstate State.Find()
  51. //
  52. // Return the state associated with the given task if it exists, or none if
  53. // no state has been created for this task.
  54. //
  55. prototype hstate State.Find( htask t );
  56.  
  57. //
  58. // hstate State.Create( htask t, int progress )
  59. // 
  60. // Create a state and associate it with the given task. Assign the given
  61. // progress value to the state.
  62. //
  63. prototype hstate State.Create( htask t, int progress );
  64.  
  65. //
  66. // hstate State.Destroy( htask t )
  67. //
  68. // Destroy the given state.
  69. //
  70. prototype hstate State.Destroy( htask t );
  71.  
  72. //
  73. // State.DestroyAll()
  74. //
  75. // Destroy all states.
  76. //
  77. prototype State.DestroyAll();
  78.  
  79. //
  80. // State.SetProgress( hstate state, int progress )
  81. //
  82. // Set the given state's progress value.
  83. //
  84. prototype State.SetProgress( hstate state, int progress );
  85.  
  86. //
  87. // State.Progress( hstate state )
  88. //
  89. // Return the given state's progress value.
  90. //
  91. prototype int State.Progress( hstate state );
  92.  
  93. //
  94. // State.Restore( hstate state )
  95. //
  96. // Restart the task for the given state, if it is currently halted.
  97. //
  98. prototype State.Restore( hstate state );
  99.  
  100. //
  101. // State.Lock(hstate state)
  102. //
  103. // Lock the state so no further SetProgress calls will work
  104. //
  105. prototype State.Lock(hstate state);
  106.  
  107. //
  108. // State.Unlock(hstate state)
  109. //
  110. // Unlock the state
  111. //
  112. prototype State.Unlock(hstate state);
  113.  
  114. //
  115. // bool State.IsLocked()
  116. //
  117. // Determine if the state is locked
  118. //
  119. prototype bool State.IsLocked(hstate state);
  120.  
  121. #endif // FLUX_LIB
  122.